From: Glenn Morris Date: Tue, 9 Nov 2010 08:00:46 +0000 (-0800) Subject: * lisp/progmodes/meta-mode.el: (meta-indent-line): Simplify. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5750 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c32939a692c4fa00c9469221399be5a6e3aad0de;p=emacs.git * lisp/progmodes/meta-mode.el: (meta-indent-line): Simplify. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d4c567f5230..14fd843bbfb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2010-11-09 Glenn Morris * progmodes/meta-mode.el: Remove leading `*' from defcustom docs. + (meta-indent-line): Simplify. * vc/emerge.el (emerge-line-number-in-buf): * textmodes/ispell.el (ispell-region): diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index d40e0d77ef3..294c75c9ccf 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -575,12 +575,11 @@ If the list was changed, sort the list and remove duplicates first." "Indent the line containing point as Metafont or MetaPost source." (interactive) (let ((indent (meta-indent-calculate))) - (save-excursion - (if (/= (current-indentation) indent) - (let ((beg (line-beginning-position)) - (end (progn (back-to-indentation) (point)))) - (delete-region beg end) - (indent-to indent)))) + (if (/= (current-indentation) indent) + (save-excursion + (delete-region (line-beginning-position) + (progn (back-to-indentation) (point))) + (indent-to indent))) (if (< (current-column) indent) (back-to-indentation))))